.class Lcom/example/m6wmr/ShopinActivity$9;
.super Ljava/lang/Thread;
.source "ShopinActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/ShopinActivity;->getshopstyle()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/ShopinActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/ShopinActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    .line 775
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 14

    .prologue
    .line 777
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 778
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    .line 779
    const-string v12, "userInfo"

    const/4 v13, 0x0

    .line 778
    invoke-virtual {v11, v12, v13}, Lcom/example/m6wmr/ShopinActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    .line 780
    .local v7, "preferences":Landroid/content/SharedPreferences;
    const-string v11, "uid"

    const-string v12, ""

    invoke-interface {v7, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 781
    .local v0, "account":Ljava/lang/String;
    const-string v11, "pass"

    const-string v12, ""

    invoke-interface {v7, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 783
    .local v8, "pwd":Ljava/lang/String;
    new-instance v6, Landroid/os/Message;

    invoke-direct {v6}, Landroid/os/Message;-><init>()V

    .line 784
    .local v6, "msg":Landroid/os/Message;
    if-eqz v0, :cond_0

    const-string v11, ""

    invoke-virtual {v0, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_1

    .line 785
    :cond_0
    const/4 v11, 0x3

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 787
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    # getter for: Lcom/example/m6wmr/ShopinActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/m6wmr/ShopinActivity;->access$21(Lcom/example/m6wmr/ShopinActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 834
    :goto_0
    return-void

    .line 789
    :cond_1
    new-instance v11, Ljava/lang/StringBuilder;

    iget-object v12, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    # getter for: Lcom/example/m6wmr/ShopinActivity;->m:Lmyapp/MyApp;
    invoke-static {v12}, Lcom/example/m6wmr/ShopinActivity;->access$6(Lcom/example/m6wmr/ShopinActivity;)Lmyapp/MyApp;

    move-result-object v12

    invoke-virtual {v12}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v12

    invoke-static {v12}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v12, "/index.php?ctrl=app&action=opentypelist&datatype=json"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    .line 791
    .local v10, "url":Ljava/lang/String;
    const-string v11, "ShopyushowACtivity"

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "checklogin()\u3000"

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-static {v11, v12}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 793
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    # getter for: Lcom/example/m6wmr/ShopinActivity;->m:Lmyapp/MyApp;
    invoke-static {v11}, Lcom/example/m6wmr/ShopinActivity;->access$6(Lcom/example/m6wmr/ShopinActivity;)Lmyapp/MyApp;

    move-result-object v11

    invoke-static {v10, v11}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v9

    .line 798
    .local v9, "str":Ljava/lang/String;
    :try_start_0
    new-instance v4, Lorg/json/JSONObject;

    invoke-direct {v4, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 799
    .local v4, "json":Lorg/json/JSONObject;
    const-string v11, "error"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    const-string v12, "true"

    invoke-virtual {v11, v12}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_2

    .line 801
    const-string v11, "msg"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    iput-object v11, v6, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 802
    const/4 v11, 0x1

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 803
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    # getter for: Lcom/example/m6wmr/ShopinActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/m6wmr/ShopinActivity;->access$21(Lcom/example/m6wmr/ShopinActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 825
    .end local v4    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v2

    .line 827
    .local v2, "e":Lorg/json/JSONException;
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    .line 828
    const/4 v11, 0x4

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 830
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    # getter for: Lcom/example/m6wmr/ShopinActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/m6wmr/ShopinActivity;->access$21(Lcom/example/m6wmr/ShopinActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 811
    .end local v2    # "e":Lorg/json/JSONException;
    .restart local v4    # "json":Lorg/json/JSONObject;
    :cond_2
    :try_start_1
    const-string v11, "msg"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v1

    .line 812
    .local v1, "array":Lorg/json/JSONArray;
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    new-instance v12, Ljava/util/ArrayList;

    invoke-direct {v12}, Ljava/util/ArrayList;-><init>()V

    invoke-static {v11, v12}, Lcom/example/m6wmr/ShopinActivity;->access$30(Lcom/example/m6wmr/ShopinActivity;Ljava/util/List;)V

    .line 813
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_1
    invoke-virtual {v1}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-lt v3, v11, :cond_3

    .line 821
    const/16 v11, 0xa

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 823
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    # getter for: Lcom/example/m6wmr/ShopinActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/m6wmr/ShopinActivity;->access$21(Lcom/example/m6wmr/ShopinActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_0

    .line 814
    :cond_3
    new-instance v5, Lbean/SpinnerData;

    invoke-direct {v5}, Lbean/SpinnerData;-><init>()V

    .line 815
    .local v5, "map":Lbean/SpinnerData;
    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v12

    const-string v13, "name"

    invoke-virtual {v12, v13}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "-"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v1, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v12

    const-string v13, "cattypename"

    invoke-virtual {v12, v13}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v5, v11}, Lbean/SpinnerData;->setText(Ljava/lang/String;)V

    .line 816
    invoke-virtual {v1, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "id"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v5, v11}, Lbean/SpinnerData;->setValue(Ljava/lang/String;)V

    .line 817
    iget-object v11, p0, Lcom/example/m6wmr/ShopinActivity$9;->this$0:Lcom/example/m6wmr/ShopinActivity;

    # getter for: Lcom/example/m6wmr/ShopinActivity;->list:Ljava/util/List;
    invoke-static {v11}, Lcom/example/m6wmr/ShopinActivity;->access$18(Lcom/example/m6wmr/ShopinActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 813
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 839
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 840
    monitor-exit p0

    return-void

    .line 839
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
